<template>
    <el-table :data="tableData" style="width: 100%">
        <el-table-column property="courseId" label="课程编号" width="120"/>
        <el-table-column property="name" label="课程名称" width="120"/>
        <el-table-column property="credits" label="学分" width="120"/>
        <el-table-column property="classHour" label="学时" width="120"/>
        <el-table-column property="majorId" label="所属专业" width="120"/>
    </el-table>
</template>

<script setup lang="ts">
import {getStudentScheduleInfo} from "@/service/student/student.service";
import {ElTable} from 'element-plus'
import {onMounted, ref} from "vue";

interface User {
    date: string
    name: string
    address: string
}

const tableData = ref<any>([])

onMounted(() => {
    getStudentScheduleInfo((data: any) => {
        tableData.value = []
        for (const course of data.studentCourseList) {
            tableData.value.push(course)
        }
    })
})

</script>


<style scoped>

</style>